package com.mew.lobby.message.response;

import com.mew.common.entity.sys.Bulletin;
import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.ToString;

import java.util.List;

@Data
@ToString
public class BulletinsResponseMessage extends ZebraBaseMessage<BulletinsResponseMessage> {

    public List<Bulletin> bulletins;
    @Override
    public void write(ByteBuf byteBuf) {
        writeInt(byteBuf,bulletins.size());
        for (Bulletin bulletin : bulletins) {
            bulletin.write(byteBuf);
        }
    }

    @Override
    public BulletinsResponseMessage read(ByteBuf byteBuf) {
        return null;
    }
}
